#!/usr/bin/env python
#######
# SYN Flooder 
# Shoufu Luo
######

import socket,sys

if len(sys.argv) != 4:
	print "Usage: %s <ip> <port> <msg>" % sys.argv[0]
	sys.exit(1)

ip=sys.argv[1]
port=int(sys.argv[2])
msg = "$SF$" + sys.argv[3] + "$SF$"

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
	sock.connect((ip, port))
	sock.sendto(msg +"\n", (ip, port))

	print "Send: %s" % msg	
	received = sock.recv(1024)

	print "Received: %s" % received
finally:
	sock.close()



